<!--
 * @name: 设置
 * @version: 1.1.1
 * @Author: 刘大可
 * @Date: 2022-03-28 18:56:18
 * @LastEditors: 刘大可
 * @LastEditTime: 2023-02-17 09:53:03
-->
<template>
	<view>
		<cu-custom bgColor="bgmain" :isBack="true">
			<view slot="content">设置管理</view>
		</cu-custom>
		<view class="" v-if="1==1">
			<view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg radius">
				<view class="cu-item arrow">
					<navigator class="content" url="/gc_school/pages/replaylist/index" hover-class="none">
						<image src="/static/images/cashout.png"></image>
						<!-- <text class="cuIcon-formfill text-main"></text> -->
						<text class="text-black">我的提现</text>
					</navigator>
				</view>
				<view class="cu-item arrow" v-if="sys.mp_name">
					<navigator class="content" url="/gc_school/pages/webview/indexs" hover-class="none">
						<!-- <text class="cuIcon-formfill text-main"></text> -->
						<image src="/static/images/auth1.png"></image>
						<text class="text-black">公众号授权</text>
					</navigator>
				</view>
				<view class="cu-item arrow">
					<navigator class="content" url="/gc_school/pages/help/index" hover-class="none">
						<image src="/static/images/help.png"></image>
						<text class="text-black">帮助中心</text>
					</navigator>
				</view>
			<!-- 	<view class="cu-item arrow">
					<navigator class="content" url="/gc_school/pages/error/error" hover-class="none">
						<image src="/static/images/help.png"></image>
						<text class="lg  cuIcon-copy text-main"></text>

						<text class="text-black">运行日志</text>
					</navigator>
				</view> -->
				<!-- <view class="cu-item arrow">
					<button class="cu-btn content">
						<image src="/static/images/contact.png"></image>
						<text class="lg  cuIcon-tagfill text-main"></text>
						<text class="text-black">当前版本</text>
						<view class="ban">1.5.13</view>
					</button>
				</view> -->
				<!-- <view class="cu-item arrow" v-if="userInfo.run_status == '2'">
                        <navigator class="content" url="/gc_school/pages/grab/index" hover-class="none">
                           <text class="cuIcon-formfill text-main"></text> 
                            <image src="/static/images/order.png"></image>
                            <text class="text-black">抢单中心</text>
                        </navigator>
                    </view>  -->
				<!-- <view class="cu-item arrow" v-if="userInfo.run_status == '2'">
                        <navigator class="content" url="/gc_school/pages/mygrab/index" hover-class="none">
                            <image src="/static/images/order.png"></image>
                            <text class="text-black">我的抢单</text>
                        </navigator>
                    </view> -->

				<!-- <view class="cu-item arrow" bindtap='link' data-url='/gc_school/pages/register/index' wx:if="{{islogin  && userInfo.run_status=='0'}}">
              <view class="content">
                    <text class="cuIcon-formfill text-main"></text>
                    <text class="text-black">认证跑腿</text>
              </view>
            </view> -->
			</view>
		</view>
		<!-- <view>
			params:{{ JSON.stringify(params) }}
		</view>

		<view class="pay" @click="pays">支付</view>
 -->

		  
		<!-- <button
		
			open-type="launchApp"
			hover-class="button-hover"
			:app-parameter="feelback"
			v-if="isCallback"
		>
			支付成功，返回APP
		</button>
<button open-type="launchApp" hover-class="button-hover" :app-parameter="feelback2">
	支付成功，返回APP2
</button> -->

	</view>
</template>
<script>
	import {version

} from '@/siteinfo.js'
	export default {
		data() {
			return {
				version,
				sys:{},
				msg:"",
				params:{},
				feelback: "pay=1&cc=123",
				feelback2: {
					pay:1,
					cc:1111111
				}


			}
		},
		onLoad(options) {
			// options={
			// 	id:30,
			// 	token:"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjbGllbnQudnVlYWRtaW4iLCJhdWQiOiJzZXJ2ZXIudnVlYWRtaW4iLCJpYXQiOjE2NzI5NzQ4NTgsImV4cCI6MTY3MzA2MTI1OCwidWlkIjoyfQ.V2yWx_uHRYA5BLxLu6qrpiHqk6QvJC9W9NQB19eFQJY"
			// }
			options.o_id=options.id
			this.params=options
			this.sys=uni.getStorageSync('sys')
		},
	

		methods: {
			pays(){
				uni.login({
					provider: "weixin",
					success: (result) => {
						console.log(result);
						uni.request({
							url: 'http://renwu.fkynet.net/api/Order/pay',
							data: {
								...this.params,
								type:1,
								code: result.code
							},
							header: {
								// Accept: 'application/json',
								// 'Content-Type': 'application/json',
								// 'X-Requested-With': 'XMLHttpRequest',
								"Authorization": this.params.token,
							},
							method: 'POST',
							sslVerify: true,
							success: ({ data:res, statusCode, header }) => { 
								console.log(res);
								if (res.status==200) {
									uni.requestPayment({
										...res.data,
										success: (result) => {
											this.isCallback = true;
										},
										fail: (error) => {}
									})
								}else{
									uni.showToast({
										title: res.msg,
										icon: 'none',
										mask: true
									})
								}
							},
							fail: (error) => { }
						})
					},
					fail: (error) => {}
				})
				
			},
		},

	}
</script>

<style>
page {
		background: white;
	}

	.UCenter-bg {
		background: white;
		/* background-image: url("http://gc-paotui.mync.xyz/web/resource/images/index.jpg"); */
		background-size: cover;
		/* height: 550rpx; */
		display: flex;
		/* justify-content: center; */
		padding-top: 40rpx;
		overflow: hidden;
		position: relative;
		flex-direction: row;
		align-items: center;
		color: black;
		font-weight: 300;
		/* text-shadow: 0 0 3px rgba(0, 0, 0, 0.3); */
		/* line-height: 550rpx; */
		padding: 50rpx 60rpx;
		border-top: 1px solid #f5f5f5;
		border-bottom: 1px solid #f5f5f5;
	}

	.contents {
		padding: 70rpx 0 30rpx 0;
		color: white;
		font-size: 30rpx;
		text-align: center;
		background: #ff6444;
		/* background-image: linear-gradient(to right, #0396FF, #23AFE4, #ABDCFF) !important; */
	}

	.two_flex image {
		width: 2em !important;
		height: 2em !important;
		margin-right: 20rpx !important;
	}

	.flex-direction {
		text-align: left;
	}

	.middle {
		padding-left: 60rpx;
	}

	.isrun {
		padding: 0 20rpx;
	}

	.content image {
		width: 1.3em !important;
		height: 1.3em !important;
		margin-right: 20rpx !important;
	}

	.UCenter-bg text {
		opacity: 0.8;
	}

	.UCenter-bg image {
		width: 140rpx;
		height: 140rpx;
		margin-right: 30rpx;
		/* margin: 135rpx 30rpx 0 50rpx; */
		flex-shrink: 0;
	}

	.UCenter-bg .gif-wave {
		position: absolute;
		width: 100%;
		bottom: 0;
		left: 0;
		z-index: 99;
		mix-blend-mode: screen;
		height: 100rpx;
	}

	map,
	.mapBox {
		left: 0;
		z-index: 99;
		mix-blend-mode: screen;
		height: 100rpx;
	}

	map,
	.mapBox {
		width: 750rpx;
		height: 300rpx;
	}

	#cuIcon-homefills {
		width: 48rpx !important;
		position: relative !important;
		display: block !important;
		height: 48rpx !important;
		margin: 0 auto 10rpx !important;
		text-align: center !important;
		font-size: 40rpx !important;
	}

	#cuIcon-homefillt {
		width: 72rpx !important;
		position: absolute !important;
		display: block !important;
		height: 72rpx !important;
		margin: 0 auto 10rpx !important;
		text-align: center !important;
		font-size: 40rpx !important;
		top: 0;
		left: 0;
	}

	.indedx {
		color: #010101;
		font-size: 22rpx;
		padding: 10rpx 0 10rpx 0;
	}

	.indedxs {
		color: #010101;
		font-size: 22rpx;
		margin-top: 10rpx;
		padding: 10rpx 0 10rpx 0;
		/* padding: -1rpx 0 10rpx 0; */
		box-sizing: border-box;
	}

	.indedxt {
		color: #ff6444;
		font-size: 22rpx;
		padding: 10rpx 0 10rpx 0;
	}

	.bgmains {
		background-color: #fff !important;
	}

	.menu {
		margin: 0 !important;
	}
	.ban{
		margin-left: auto;
	}
	.cuIcon-tagfill{
		/* width: ; */
	}
	.pay{
		width: 700rpx;
		height: 100rpx;
		margin-bottom: 200rpx;
		background-color: #ff6444;
		color: #fff;
	}
</style>
